package com.qys.livesMall.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.shop.modal.dto.ShopGoodsDto;
import com.qys.livesMall.shop.modal.entity.ShopGoodsInfo;
import com.qys.livesMall.shop.modal.query.QuerySeckillShopGoods;
import com.qys.livesMall.shop.modal.query.SeachShopGoods;
import com.qys.livesMall.shop.modal.vo.ShopGoodsSkuVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2023-06-07
 */
@Mapper
public interface ShopGoodsInfoMapper extends BaseMapper<ShopGoodsInfo> {
    Page<ShopGoodsDto> queryShopGoods(Page<ShopGoodsDto> page,@Param("data") SeachShopGoods data);

    List<ShopGoodsInfo> productRecommended(Long productCategoryId);

    int changeGoodsInfoLiveStatus(@Param("goodsIds") List<Long> goodsIds,
                                  @Param("status") Integer status);

    /**
     *
     * @param page
     * @param dto
     * @return
     */
    Page<ShopGoodsSkuVO> listSearchGoods(@Param("page") Page<ShopGoodsSkuVO> page,
                                         @Param("dto") QuerySeckillShopGoods dto);
    List<ShopGoodsSkuVO> getSkuList(Long goodsId);

    List<Long> getOnLiveGoodsInfo(List<String> livesList);

    LocalDateTime getLastUpShelfTime(@Param("shopId") Long shopId);
}
